package com.ex.views;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;

public class HalfView extends View{
	private Paint paint;
	private int radius = 14;
	
	public HalfView(Context context) {
		super(context);
	}
	
	public HalfView(Context context, AttributeSet attrs){
		super(context, attrs);
	}

	public HalfView(Context context, AttributeSet attrs, int defStyleAttr) {
		super(context, attrs, defStyleAttr);
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		paint = new Paint();
		paint.setColor(Color.GREEN);
		paint.setStyle(Style.FILL);
		RectF rectF = new RectF(0, 0, 2 * radius, 2 * radius);
		canvas.drawArc(rectF, 0, 180, true, paint);
//		canvas.drawCircle(radius, radius, radius, paint);
	}

}
